SOLR-17318 VersionTool now reports remote server version#4275
SOLR-17318 VersionTool now reports remote server version#4275janhoy wants to merge 2 commits intoapache:mainfrom
Conversation
…ersion when `--solr-url` is provided
|
PS: picocli support will be added later in the picocli branch after rebasing... |
epugh
left a comment
There was a problem hiding this comment.
Nice to get this jira knocked out!
| @Override | ||
| public Options getOptions() { | ||
| return super.getOptions() | ||
| .addOption(CommonCLIOptions.SOLR_URL_OPTION) |
There was a problem hiding this comment.
Do we need to support the --zk option to connect for consistency? Don't all our tools allow both??
There was a problem hiding this comment.
I opted out of supporting --zk-host as it feels redundant for this command. Can add later if needed.
| tool.runTool(SolrCLI.processCommandLineArgs(tool, toolArgs)); | ||
|
|
||
| String output = runtime.getOutput(); | ||
| assertTrue("Output should contain 'Client version:'", output.contains("Client version:")); |
There was a problem hiding this comment.
In other code I saw a nicer assert style for contains in a setting🤔, though I can't remember right now what it was!!
| @Override | ||
| public void runImpl(CommandLine cli) throws Exception { | ||
| CLIO.out("Solr version is: " + SolrVersion.LATEST); | ||
| echo("Client version: " + SolrVersion.LATEST); |
There was a problem hiding this comment.
This is a back compatibility break, but I think one we can live with?
Note that also --version calls the version tool and gets this change.
...when
--solr-urlis providedhttps://issues.apache.org/jira/browse/SOLR-17318